package com.zyz.B_流程控制.分支结构_switch;

/**
 * @author: vick
 * @Date: 2025/3/11
 * @Description:
 * @version: 1.0
 */
public class Demo2 {
    public static void main(String[] args) {
        String name = "苹果";
        switch (name) {
            case "苹果":
                System.out.println("apple");
                break;
            case "香蕉":
                System.out.println("香蕉");
                break;
            case "榴莲":
                System.out.println("榴莲");
                break;
            case "橘子":
                System.out.println("橘子");
                break;
            default:
                System.out.println("未知");
        }
    }
}
